In [ ]:
import plotly.io as pio
pio.renderers.default = 'notebook'

Correr el plot iterativo en el propio notebook

In [ ]:
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, iplot, iplot
In [ ]:
iplot([go.Scatter(x=[1, 2, 3], y=[3, 1, 6])])
In [ ]:
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
                 size='petal_length', hover_data=['petal_width'])
fig.show()
In [ ]:
import plotly.express as px

long_df = px.data.medals_long()

fig = px.bar(long_df, x="nation", y="count", color="medal", title="Long-Form Input")
fig.show()
In [ ]:
import plotly.express as px
df = px.data.carshare()
fig = px.scatter_mapbox(df, lat="centroid_lat", lon="centroid_lon", color="peak_hour", size="car_hours",
                  color_continuous_scale=px.colors.cyclical.IceFire, size_max=15, zoom=10,
                  mapbox_style="carto-positron")
fig.show()

Guardarlo en el pc :

In [ ]:
import plotly.express as px

fig =px.scatter(x=range(10), y=range(10))
fig.write_html("hola.html")